
CC = gcc
LD = ld
RM = rm -f

CFLAGS = -I../include -Wall -fpic -fno-stack-protector
LDFLAGS = -shared

OBJ = ../helpers.o fdd.o
BIN = ../fdd.edi

.PHONY: all clean

all: $(BIN)

clean:
	$(RM) $(BIN) $(OBJ)

$(BIN): $(OBJ)
	$(LD) -o $(BIN) $(OBJ) $(LDFLAGS)
	objdump -d $(BIN) > $(BIN).dsm
	cp $(BIN) /mnt/AcessHDD/Acess/Modules/

$(OBJ): %.o: %.c
	$(CC) -o $@ -c $< $(CFLAGS)
